﻿<%@ Page Title="Category Type Master" Language="C#" MasterPageFile="~/GEMS.master"
    AutoEventWireup="true" CodeFile="CategoryTypeMaster.aspx.cs" Inherits="CategoryMaster" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script language="javascript" type="text/javascript">
        function validate() {
            var Show = '';

            if (document.getElementById("<%=txtCattypecode.ClientID %>").value == "") {
                Show = Show + '\n - Enter Category Type Code';
            }

            if (document.getElementById("<%=txtcatname.ClientID %>").value == "") {
                Show = Show + '\n - Enter Category Type Name';
            }


            if (Show != '') {
                alert(Show);
                return false;
            }
            else {
                return true;
            }
        }

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="container960">
        <div class="container_12 container_16">
            <div class="full">
                <div class="content">
                    <h2>
                        Category Type Master</h2>
                    <div class="f_head r2 box">
                        <div class="head_con">
                            <div class="c1">
                                <div class="rw1">
                                    <span class="text">Category Type Code</span>
                                    <asp:TextBox ID="txtCattypecode" runat="server" CssClass="text_field field"></asp:TextBox>
                                </div>
                            </div>
                            <div class="c2">
                                <div class="rw1">
                                    <span class="text">Category Type Name</span>
                                    <asp:TextBox ID="txtcatname" runat="server" CssClass="text_field field"></asp:TextBox>
                                </div>
                            </div>
                            <div class="rw1 row_btn">
                                <asp:Button ID="btn_add" runat="server" Text="Add" class="lgin" OnClick="btn_add_Click"
                                    OnClientClick=" return validate();" />
                            </div>
                        </div>
                    </div>
                    <div class="box" id="count_grid">
                        <div class="grid1">
                            <asp:GridView ID="GridView1" runat="server" BackColor="White" CssClass="mGrid" GridLines="Vertical"
                                DataKeyNames="CategoryType_Id" AutoGenerateColumns="False">
                                <Columns>
                                    <asp:TemplateField HeaderText="Edit">
                                        <ItemTemplate>
                                            <asp:ImageButton ID="Ibtedt" runat="server" CausesValidation="False" ImageUrl="~/css/images/edit.jpg"
                                                OnClick="ibtEdit_Click" Text="Edit" ToolTip="Click here to Edit" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Delete">
                                        <ItemTemplate>
                                            <asp:ImageButton ID="ibtdlt" runat="server" CausesValidation="False" ImageUrl="~/css/images/delete.gif"
                                                Text="Delete" ToolTip="Click here to Delete" OnClick="ibtdelete_Click" OnClientClick="return confirm('Are you sure to delete ?');" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField  HeaderText="Mapping">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lnkmapp"  runat="server" CausesValidation="False"  OnClick="lnkmapp_Click"   >Mapping</asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <%--<asp:HyperLinkField DataTextField="Mapping" HeaderText="Mapping" NavigateUrl="~/CategoryMapping.aspx" />--%>
                                    <asp:BoundField HeaderText="Code" DataField="TypeCode" />
                                    <asp:BoundField HeaderText="Name" DataField="TypeName" />
                                </Columns>
                            </asp:GridView>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
